DISCUSSION
The
ATSUGetAllFontVariations function obtains an array of the variation axes and values corresponding to all previously set font variations in a style object. You can obtain a particular variation value by passing its corresponding variation axis to the function
ATSUGetFontVariationValue.
The best way to use
ATSUGetAllFontVariations is to call it twice:
-
Pass a reference to the style object containing the font variation in the iStyle parameter, NULL for the oVariationAxes and oATSUFontVariationValues parameters, and 0 for the other parameters. ATSUGetAllFontVariations returns the size of the axes and value arrays in the oActualVariationCount parameter.
-
Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oVariationAxes and oATSUFontVariationValues parameters; on return, the pointers reference arrays of variation axes and values, respectively.